package com.chengjue.controller;


import com.chengjue.pojo.TbItem;
import com.chengjue.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 商品管理controller
 */
@RestController
@RequestMapping("/item")
public class ItemController {
    @Autowired
    ItemService itemService;

    @RequestMapping(value = "{itemId}", method = RequestMethod.GET)
    public TbItem getItemById(@PathVariable Long itemId){
        return itemService.getItmById(itemId);
    }
}
